// import QtQuick 1.0 // to target S60 5th Edition or Maemo 5
import QtQuick 1.1
import com.nokia.symbian 1.1
import com.rogerio.metro 1.0

import Basicos 1.0

Page {
    id: root
    tools: ToolBarLayout {
        ToolButton {
            iconSource: "toolbar-back"
            onClicked: pageStack.pop().destroy(500);
        }
    }   

    Item {
        anchors.fill: parent
        clip: false

        Image {
            id: img
            width: parent.width; height: parent.height
            source: "qrc:///abertura"
        }

        Rectangle {
            id: rect1
            width: parent.width; height: 280
            y: -rect1.height
            color: "black"
        }

        Rectangle {
            id: rect2
            width: parent.width; height: 280
            y: img.height
            color: "black"
        }

        ParallelAnimation {
            id: anim
            running: false
            NumberAnimation { target: rect1; property: "y"; to: parent.height / 2 - rect1.height - 50; duration: 2000; easing.type: Easing.InOutQuad }
            NumberAnimation { target: rect2; property: "y"; to: parent.height / 2 + 50; duration: 2000; easing.type: Easing.InOutQuad }
            NumberAnimation { target: img; property: "opacity"; to: 0.3; duration: 3000; easing.type: Easing.InOutQuad }
        }
    }

    InfoAnimadoBackground {
        width: parent.width; height: parent.height
        textoInfo: "Sobre"
        mostraConteudoDepois: false

        Column {
            //width: parent.width * 0.70
            anchors.centerIn: parent
            spacing: 10

            Row {
                spacing: 10

                Rectangle {
                    width: 80; height: 80;
                    color: "white"

                    Image {
                        anchors.fill: parent
                        source: "qrc:///subway"
                    }
                }

                Text {
                    text: "DenunciaMetro"
                    color: "white"
                    font { pixelSize: 22; bold: true }
                    smooth: true
                }
            }

            Column {
                width: parent.width
                spacing: 2

                Text {
                    width: parent.width
                    text: "Versão: " + util.versao
                    color: "white"
                    font { pixelSize: 18 }
                    wrapMode: Text.WordWrap

                    Utilidade {
                        id: util
                    }
                }

                Text {
                    width: parent.width
                    text: "Autor: Rogério Paladino"
                    color: "white"
                    font { pixelSize: 18 }
                    wrapMode: Text.WordWrap
                }

                Text {
                    width: parent.width
                    text: "Contato: segaaaa@gmail.com"
                    color: "white"
                    font { pixelSize: 18 }
                    wrapMode: Text.WordWrap
                }

                Text {
                    width: parent.width
                    text: "Este aplicativo não possui qualquer suporte ou vínculo com as empresas Metrô e CPTM."
                    color: "white"
                    font { pixelSize: 18; italic: true }
                    wrapMode: Text.WordWrap
                }
            }
        }
    }

    Component.onCompleted: {

    }

    onHeightChanged: {
        anim.start();
    }
}
